import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';

@Component({
  selector: 'app-recommend',
  templateUrl: './recommend.component.html',
  styleUrls: ['./recommend.component.scss'],
})
export class RecommendComponent implements OnInit {

  constructor(
    private router: Router,
  ) { }

  ngOnInit() { }
  onHomeTabChange(val) {

    switch (val.detail.value) {
      case '1':
        this.router.navigateByUrl('/home/music')
        break;
      case '2':
        this.router.navigateByUrl('/home/mv')
        break;
      case '3':
        this.router.navigateByUrl('/home/channel')
        break;
      case '4':
        this.router.navigateByUrl('/home/rank')
        break;
      default:
        this.router.navigateByUrl('/home/music')
        break;
    }
  }
}
